<template>




  <tr>
    <td><input type="checkbox" v-model="obj1.checked"></td>
    <td>{{obj1.name}}</td>
    <td>{{obj1.price}}</td>
    <td>
      <button @click="del(ind)">-</button>
      {{obj1.num}}
      <button @click="add(ind)">+</button>
    </td>
    <td>
      {{obj1.price*obj1.num}}
    </td>
    <td>
      <button @click="sc(ind)">删除</button>
    </td>
  </tr>




</template>

<script>
  export default {
    props: ['obj1', 'ind'],
    data() {
      return {

      };
    },
    methods: {
      add(ind) {
        this.$emit('addfn', ind)
      },
      del(ind) {
        this.$emit('delfn', ind)
      },
      sc(ind) {
        this.$emit('scfn', ind)
      }
    }
  };
</script>

<style>
</style>